package com.itheima.reggie.mapper;

import com.itheima.reggie.entity.Setmeal;
import com.itheima.reggie.entity.SetmealDish;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SetmealDishMapper {

    //根据删除的id查询状态为1的套餐的总数量
    void saveBatch(@Param("setmealDishes") List<SetmealDish> setmealDishes);


    //根据套餐的id删除套餐菜品
    void deleteBysetmealIds(@Param("ids") List<Long> ids);

    //移动端套餐显示
    @Select("select * from setmeal where category_id=#{categoryId} and status=#{status}")
    List<Setmeal> list(@Param("categoryId") Long categoryId,@Param("status") Integer status);
}
